home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Packard Bell - Multimedia…D & Packard Bell Library
/
Packard Bell Master CD.iso
/
diskimag
/
msdos62
/
disk4.img
/
DBLBOOT.BA_
/
DBLBOOT.bin
Wrap
Text File
|
1993-09-30
|
3KB
|
107 lines
@echo off
rem Batch file to create a bootable, DoubleSpaced floppy.
set _AM=XXX
if not "%_AM%"=="XXX" goto env_error
if "%1" == "/?" goto usage
if not "%1" == "" goto start
:usage
echo.
echo Batch file to create a bootable, DoubleSpaced floppy. For use only with
echo high density (1.44 and 1.2 megabyte) diskettes. Lower density diskettes when
echo DoubleSpaced do not have adequate uncompressed space for system files
echo required for booting.
echo.
echo Usage: dblboot drive
echo.
goto end
:start
echo.
echo This batch file will create a bootable DoubleSpaced diskette on either
echo a 1.44 megabyte 3.5 inch or 1.2 megabyte 5.25 inch floppy. Lower density
echo DoubleSpaced diskettes do not have adequate uncompressed space for system
echo files and should not be used.
choice /c:yn "Do you wish to continue"
if errorlevel 2 goto end
if "%1" == "a:" goto diskette
if "%1" == "b:" goto diskette
echo You have selected drive %1
choice /c:yn "Is this correct"
if errorlevel 2 goto end
:diskette
SET _AM=OFF
am %1 > NUL
if errorlevel 1 SET _AM=ON
am %1 OFF
if errorlevel 1 goto am_error
choice /c:ny "Is diskette already compressed"
if errorlevel 2 goto nocompress
choice /c:yn "Do you wish to format the diskette first"
if errorlevel 2 goto noformat
echo. > c:\dblboot.tmp
echo n >> c:\dblboot.tmp
echo Formatting drive %1...
if not exist c:\dblboot.tmp goto no_temp
format %1 /v:dblboot /u < c:\dblboot.tmp > NUL
del c:\dblboot.tmp > nul
goto noformat
:no_temp
format %1 /u /q
if errorlevel 1 goto format_error
:noformat
dblspace /compress %1
:nocompress
dblspace /mount %1 > NUL
dblspace /size /reserve=.2 %1
copy c:\command.com %1
:mk_bootable
dblspace /unmount %1 > NUL
:system
sys %1
rem create ini file on diskette
deltree /y %1\dblspace.ini > nul
echo MaxRemovableDrives=2 > %1\dblspace.ini
echo FirstDrive=E >> %1\dblspace.ini
echo LastDrive=I >> %1\dblspace.ini
echo MaxFileFragments=117 >> %1\dblspace.ini
echo ActivateDrive=I,A0 >> %1\dblspace.ini
attrib %1\dblspace.ini +s +h +r
if "%_AM%"=="ON" am %1 on
choice /c:yn "Mount new compressed drive now"
if errorlevel 2 goto end
dblspace /mount %1
goto end
:format_error
echo .
echo An error occured while attemting to format the diskette in drive %1.
echo Please retry with a new diskette.
echo .
goto end
:env_error
echo .
echo ERROR: Not enough environment space to run DBLBOOT.BAT!
echo .
goto end
:am_error
echo .
echo An error occured while disabling dblspace automount.
echo .
:end
SET _AM=